package com.example.ruleenginelearning.example.model;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Order {
    private String id;
    private String status;
    private double amount;
    private boolean vip;
    private Integer itemCount;
    private List<String> items = new ArrayList<>();
    
    public Order(String id, String status) {
        this.id = id;
        this.status = status;
    }
    
    public void addItem(String item) {
        items.add(item);
    }


    public boolean isVip() {
        return true;
    }

    // 构造器和方法保持不变...
    public void applyDiscount(double ratio) {
        this.amount *= ratio;
    }


}
